package socket;
// [V] Add 2 commands
public enum ClientCommand {
	exit("exit"),
	unknown(""),
	writemsg("writemsg"),
	readmsg("readmsg");
	
	private String clientCommand;
	
	
	private ClientCommand (final String string) {
		this.clientCommand = string; 
	}
	
	public String toString() { 
		return this.clientCommand; 
	}
	
	static public ClientCommand getType(String type) {
        for (ClientCommand command: ClientCommand.values()) {
            if (command.toString().equals(type)) {
                return command;
            }
        }
        return unknown;
    }


}
